package stdio.costa.imoca.spi;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import stdio.costa.imoca.dao.ActivityDao;
import stdio.costa.imoca.model.Activity;

@Component
public class ActivitySpi {

	@Autowired
	private ActivityDao activityDao;

	public void save(Activity activity) {
		this.activityDao.save(activity);
	}
	
	public void update(Activity activity) {
		this.activityDao.update(activity);
	}

	public Activity findActivityByUuid(String uuid) {
		return this.activityDao.findActivityByUuid(uuid);
	}
	
	public List<Activity> findAllActivities() {
		return this.activityDao.findAllActivities();
	}
}
